3.2.15 \(\int \frac {x^4 (c+d x^2+e x^4+f x^6)}{a+b x^2} \, dx\) [115]

3.2.15.1 Optimal result
3.2.15.2 Mathematica [A] (verified)
3.2.15.3 Rubi [A] (verified)
3.2.15.4 Maple [A] (verified)
3.2.15.5 Fricas [A] (verification not implemented)
3.2.15.6 Sympy [B] (verification not implemented)
3.2.15.7 Maxima [A] (verification not implemented)
3.2.15.8 Giac [A] (verification not implemented)
3.2.15.9 Mupad [B] (verification not implemented)

3.2.15.1 Optimal result

Integrand size = 30, antiderivative size = 172 \[ \int \frac {x^4 \left (c+d x^2+e x^4+f x^6\right )}{a+b x^2} \, dx=-\frac {a \left (b^3 c-a b^2 d+a^2 b e-a^3 f\right ) x}{b^5}+\frac {\left (b^3 c-a b^2 d+a^2 b e-a^3 f\right ) x^3}{3 b^4}+\frac {\left (b^2 d-a b e+a^2 f\right ) x^5}{5 b^3}+\frac {(b e-a f) x^7}{7 b^2}+\frac {f x^9}{9 b}+\frac {a^{3/2} \left (b^3 c-a b^2 d+a^2 b e-a^3 f\right ) \arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{b^{11/2}} \]

output
-a*(-a^3*f+a^2*b*e-a*b^2*d+b^3*c)*x/b^5+1/3*(-a^3*f+a^2*b*e-a*b^2*d+b^3*c) 
*x^3/b^4+1/5*(a^2*f-a*b*e+b^2*d)*x^5/b^3+1/7*(-a*f+b*e)*x^7/b^2+1/9*f*x^9/ 
b+a^(3/2)*(-a^3*f+a^2*b*e-a*b^2*d+b^3*c)*arctan(x*b^(1/2)/a^(1/2))/b^(11/2 
)
 
3.2.15.2 Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 162, normalized size of antiderivative = 0.94 \[ \int \frac {x^4 \left (c+d x^2+e x^4+f x^6\right )}{a+b x^2} \, dx=\frac {x \left (315 a^4 f-105 a^3 b \left (3 e+f x^2\right )+21 a^2 b^2 \left (15 d+5 e x^2+3 f x^4\right )-3 a b^3 \left (105 c+35 d x^2+21 e x^4+15 f x^6\right )+b^4 x^2 \left (105 c+63 d x^2+45 e x^4+35 f x^6\right )\right )}{315 b^5}-\frac {a^{3/2} \left (-b^3 c+a b^2 d-a^2 b e+a^3 f\right ) \arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{b^{11/2}} \]

input
Integrate[(x^4*(c + d*x^2 + e*x^4 + f*x^6))/(a + b*x^2),x]
 
output
(x*(315*a^4*f - 105*a^3*b*(3*e + f*x^2) + 21*a^2*b^2*(15*d + 5*e*x^2 + 3*f 
*x^4) - 3*a*b^3*(105*c + 35*d*x^2 + 21*e*x^4 + 15*f*x^6) + b^4*x^2*(105*c 
+ 63*d*x^2 + 45*e*x^4 + 35*f*x^6)))/(315*b^5) - (a^(3/2)*(-(b^3*c) + a*b^2 
*d - a^2*b*e + a^3*f)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/b^(11/2)
 
3.2.15.3 Rubi [A] (verified)

Time = 0.36 (sec) , antiderivative size = 172, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {2333, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {x^4 \left (c+d x^2+e x^4+f x^6\right )}{a+b x^2} \, dx\)

\(\Big \downarrow \) 2333

\(\displaystyle \int \left (\frac {x^4 \left (a^2 f-a b e+b^2 d\right )}{b^3}-\frac {a \left (a^3 (-f)+a^2 b e-a b^2 d+b^3 c\right )}{b^5}+\frac {x^2 \left (a^3 (-f)+a^2 b e-a b^2 d+b^3 c\right )}{b^4}+\frac {a^5 (-f)+a^4 b e-a^3 b^2 d+a^2 b^3 c}{b^5 \left (a+b x^2\right )}+\frac {x^6 (b e-a f)}{b^2}+\frac {f x^8}{b}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {x^5 \left (a^2 f-a b e+b^2 d\right )}{5 b^3}-\frac {a x \left (a^3 (-f)+a^2 b e-a b^2 d+b^3 c\right )}{b^5}+\frac {x^3 \left (a^3 (-f)+a^2 b e-a b^2 d+b^3 c\right )}{3 b^4}+\frac {a^{3/2} \arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \left (a^3 (-f)+a^2 b e-a b^2 d+b^3 c\right )}{b^{11/2}}+\frac {x^7 (b e-a f)}{7 b^2}+\frac {f x^9}{9 b}\)

input
Int[(x^4*(c + d*x^2 + e*x^4 + f*x^6))/(a + b*x^2),x]
 
output
-((a*(b^3*c - a*b^2*d + a^2*b*e - a^3*f)*x)/b^5) + ((b^3*c - a*b^2*d + a^2 
*b*e - a^3*f)*x^3)/(3*b^4) + ((b^2*d - a*b*e + a^2*f)*x^5)/(5*b^3) + ((b*e 
 - a*f)*x^7)/(7*b^2) + (f*x^9)/(9*b) + (a^(3/2)*(b^3*c - a*b^2*d + a^2*b*e 
 - a^3*f)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/b^(11/2)
 

3.2.15.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2333
Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ 
ExpandIntegrand[(c*x)^m*Pq*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, m}, x] 
&& PolyQ[Pq, x] && IGtQ[p, -2]
 
3.2.15.4 Maple [A] (verified)

Time = 3.56 (sec) , antiderivative size = 185, normalized size of antiderivative = 1.08

method result size
default \(\frac {\frac {1}{9} f \,x^{9} b^{4}-\frac {1}{7} a \,b^{3} f \,x^{7}+\frac {1}{7} b^{4} e \,x^{7}+\frac {1}{5} a^{2} b^{2} f \,x^{5}-\frac {1}{5} a \,b^{3} e \,x^{5}+\frac {1}{5} b^{4} d \,x^{5}-\frac {1}{3} a^{3} b f \,x^{3}+\frac {1}{3} a^{2} b^{2} e \,x^{3}-\frac {1}{3} a \,b^{3} d \,x^{3}+\frac {1}{3} b^{4} c \,x^{3}+a^{4} f x -a^{3} b e x +a^{2} b^{2} d x -a \,b^{3} c x}{b^{5}}-\frac {a^{2} \left (f \,a^{3}-a^{2} b e +a \,b^{2} d -b^{3} c \right ) \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{b^{5} \sqrt {a b}}\) \(185\)
risch \(\frac {f \,x^{9}}{9 b}-\frac {a f \,x^{7}}{7 b^{2}}+\frac {e \,x^{7}}{7 b}+\frac {a^{2} f \,x^{5}}{5 b^{3}}-\frac {a e \,x^{5}}{5 b^{2}}+\frac {d \,x^{5}}{5 b}-\frac {a^{3} f \,x^{3}}{3 b^{4}}+\frac {a^{2} e \,x^{3}}{3 b^{3}}-\frac {a d \,x^{3}}{3 b^{2}}+\frac {c \,x^{3}}{3 b}+\frac {a^{4} f x}{b^{5}}-\frac {a^{3} e x}{b^{4}}+\frac {a^{2} d x}{b^{3}}-\frac {a c x}{b^{2}}+\frac {\sqrt {-a b}\, a^{4} \ln \left (-\sqrt {-a b}\, x -a \right ) f}{2 b^{6}}-\frac {\sqrt {-a b}\, a^{3} \ln \left (-\sqrt {-a b}\, x -a \right ) e}{2 b^{5}}+\frac {\sqrt {-a b}\, a^{2} \ln \left (-\sqrt {-a b}\, x -a \right ) d}{2 b^{4}}-\frac {\sqrt {-a b}\, a \ln \left (-\sqrt {-a b}\, x -a \right ) c}{2 b^{3}}-\frac {\sqrt {-a b}\, a^{4} \ln \left (\sqrt {-a b}\, x -a \right ) f}{2 b^{6}}+\frac {\sqrt {-a b}\, a^{3} \ln \left (\sqrt {-a b}\, x -a \right ) e}{2 b^{5}}-\frac {\sqrt {-a b}\, a^{2} \ln \left (\sqrt {-a b}\, x -a \right ) d}{2 b^{4}}+\frac {\sqrt {-a b}\, a \ln \left (\sqrt {-a b}\, x -a \right ) c}{2 b^{3}}\) \(364\)

input
int(x^4*(f*x^6+e*x^4+d*x^2+c)/(b*x^2+a),x,method=_RETURNVERBOSE)
 
output
1/b^5*(1/9*f*x^9*b^4-1/7*a*b^3*f*x^7+1/7*b^4*e*x^7+1/5*a^2*b^2*f*x^5-1/5*a 
*b^3*e*x^5+1/5*b^4*d*x^5-1/3*a^3*b*f*x^3+1/3*a^2*b^2*e*x^3-1/3*a*b^3*d*x^3 
+1/3*b^4*c*x^3+a^4*f*x-a^3*b*e*x+a^2*b^2*d*x-a*b^3*c*x)-a^2*(a^3*f-a^2*b*e 
+a*b^2*d-b^3*c)/b^5/(a*b)^(1/2)*arctan(b*x/(a*b)^(1/2))
 
3.2.15.5 Fricas [A] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 368, normalized size of antiderivative = 2.14 \[ \int \frac {x^4 \left (c+d x^2+e x^4+f x^6\right )}{a+b x^2} \, dx=\left [\frac {70 \, b^{4} f x^{9} + 90 \, {\left (b^{4} e - a b^{3} f\right )} x^{7} + 126 \, {\left (b^{4} d - a b^{3} e + a^{2} b^{2} f\right )} x^{5} + 210 \, {\left (b^{4} c - a b^{3} d + a^{2} b^{2} e - a^{3} b f\right )} x^{3} - 315 \, {\left (a b^{3} c - a^{2} b^{2} d + a^{3} b e - a^{4} f\right )} \sqrt {-\frac {a}{b}} \log \left (\frac {b x^{2} - 2 \, b x \sqrt {-\frac {a}{b}} - a}{b x^{2} + a}\right ) - 630 \, {\left (a b^{3} c - a^{2} b^{2} d + a^{3} b e - a^{4} f\right )} x}{630 \, b^{5}}, \frac {35 \, b^{4} f x^{9} + 45 \, {\left (b^{4} e - a b^{3} f\right )} x^{7} + 63 \, {\left (b^{4} d - a b^{3} e + a^{2} b^{2} f\right )} x^{5} + 105 \, {\left (b^{4} c - a b^{3} d + a^{2} b^{2} e - a^{3} b f\right )} x^{3} + 315 \, {\left (a b^{3} c - a^{2} b^{2} d + a^{3} b e - a^{4} f\right )} \sqrt {\frac {a}{b}} \arctan \left (\frac {b x \sqrt {\frac {a}{b}}}{a}\right ) - 315 \, {\left (a b^{3} c - a^{2} b^{2} d + a^{3} b e - a^{4} f\right )} x}{315 \, b^{5}}\right ] \]

input
integrate(x^4*(f*x^6+e*x^4+d*x^2+c)/(b*x^2+a),x, algorithm="fricas")
 
output
[1/630*(70*b^4*f*x^9 + 90*(b^4*e - a*b^3*f)*x^7 + 126*(b^4*d - a*b^3*e + a 
^2*b^2*f)*x^5 + 210*(b^4*c - a*b^3*d + a^2*b^2*e - a^3*b*f)*x^3 - 315*(a*b 
^3*c - a^2*b^2*d + a^3*b*e - a^4*f)*sqrt(-a/b)*log((b*x^2 - 2*b*x*sqrt(-a/ 
b) - a)/(b*x^2 + a)) - 630*(a*b^3*c - a^2*b^2*d + a^3*b*e - a^4*f)*x)/b^5, 
 1/315*(35*b^4*f*x^9 + 45*(b^4*e - a*b^3*f)*x^7 + 63*(b^4*d - a*b^3*e + a^ 
2*b^2*f)*x^5 + 105*(b^4*c - a*b^3*d + a^2*b^2*e - a^3*b*f)*x^3 + 315*(a*b^ 
3*c - a^2*b^2*d + a^3*b*e - a^4*f)*sqrt(a/b)*arctan(b*x*sqrt(a/b)/a) - 315 
*(a*b^3*c - a^2*b^2*d + a^3*b*e - a^4*f)*x)/b^5]
 
3.2.15.6 Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 337 vs. \(2 (167) = 334\).

Time = 0.45 (sec) , antiderivative size = 337, normalized size of antiderivative = 1.96 \[ \int \frac {x^4 \left (c+d x^2+e x^4+f x^6\right )}{a+b x^2} \, dx=x^{7} \left (- \frac {a f}{7 b^{2}} + \frac {e}{7 b}\right ) + x^{5} \left (\frac {a^{2} f}{5 b^{3}} - \frac {a e}{5 b^{2}} + \frac {d}{5 b}\right ) + x^{3} \left (- \frac {a^{3} f}{3 b^{4}} + \frac {a^{2} e}{3 b^{3}} - \frac {a d}{3 b^{2}} + \frac {c}{3 b}\right ) + x \left (\frac {a^{4} f}{b^{5}} - \frac {a^{3} e}{b^{4}} + \frac {a^{2} d}{b^{3}} - \frac {a c}{b^{2}}\right ) + \frac {\sqrt {- \frac {a^{3}}{b^{11}}} \left (a^{3} f - a^{2} b e + a b^{2} d - b^{3} c\right ) \log {\left (- \frac {b^{5} \sqrt {- \frac {a^{3}}{b^{11}}} \left (a^{3} f - a^{2} b e + a b^{2} d - b^{3} c\right )}{a^{4} f - a^{3} b e + a^{2} b^{2} d - a b^{3} c} + x \right )}}{2} - \frac {\sqrt {- \frac {a^{3}}{b^{11}}} \left (a^{3} f - a^{2} b e + a b^{2} d - b^{3} c\right ) \log {\left (\frac {b^{5} \sqrt {- \frac {a^{3}}{b^{11}}} \left (a^{3} f - a^{2} b e + a b^{2} d - b^{3} c\right )}{a^{4} f - a^{3} b e + a^{2} b^{2} d - a b^{3} c} + x \right )}}{2} + \frac {f x^{9}}{9 b} \]

input
integrate(x**4*(f*x**6+e*x**4+d*x**2+c)/(b*x**2+a),x)
 
output
x**7*(-a*f/(7*b**2) + e/(7*b)) + x**5*(a**2*f/(5*b**3) - a*e/(5*b**2) + d/ 
(5*b)) + x**3*(-a**3*f/(3*b**4) + a**2*e/(3*b**3) - a*d/(3*b**2) + c/(3*b) 
) + x*(a**4*f/b**5 - a**3*e/b**4 + a**2*d/b**3 - a*c/b**2) + sqrt(-a**3/b* 
*11)*(a**3*f - a**2*b*e + a*b**2*d - b**3*c)*log(-b**5*sqrt(-a**3/b**11)*( 
a**3*f - a**2*b*e + a*b**2*d - b**3*c)/(a**4*f - a**3*b*e + a**2*b**2*d - 
a*b**3*c) + x)/2 - sqrt(-a**3/b**11)*(a**3*f - a**2*b*e + a*b**2*d - b**3* 
c)*log(b**5*sqrt(-a**3/b**11)*(a**3*f - a**2*b*e + a*b**2*d - b**3*c)/(a** 
4*f - a**3*b*e + a**2*b**2*d - a*b**3*c) + x)/2 + f*x**9/(9*b)
 
3.2.15.7 Maxima [A] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 172, normalized size of antiderivative = 1.00 \[ \int \frac {x^4 \left (c+d x^2+e x^4+f x^6\right )}{a+b x^2} \, dx=\frac {{\left (a^{2} b^{3} c - a^{3} b^{2} d + a^{4} b e - a^{5} f\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b} b^{5}} + \frac {35 \, b^{4} f x^{9} + 45 \, {\left (b^{4} e - a b^{3} f\right )} x^{7} + 63 \, {\left (b^{4} d - a b^{3} e + a^{2} b^{2} f\right )} x^{5} + 105 \, {\left (b^{4} c - a b^{3} d + a^{2} b^{2} e - a^{3} b f\right )} x^{3} - 315 \, {\left (a b^{3} c - a^{2} b^{2} d + a^{3} b e - a^{4} f\right )} x}{315 \, b^{5}} \]

input
integrate(x^4*(f*x^6+e*x^4+d*x^2+c)/(b*x^2+a),x, algorithm="maxima")
 
output
(a^2*b^3*c - a^3*b^2*d + a^4*b*e - a^5*f)*arctan(b*x/sqrt(a*b))/(sqrt(a*b) 
*b^5) + 1/315*(35*b^4*f*x^9 + 45*(b^4*e - a*b^3*f)*x^7 + 63*(b^4*d - a*b^3 
*e + a^2*b^2*f)*x^5 + 105*(b^4*c - a*b^3*d + a^2*b^2*e - a^3*b*f)*x^3 - 31 
5*(a*b^3*c - a^2*b^2*d + a^3*b*e - a^4*f)*x)/b^5
 
3.2.15.8 Giac [A] (verification not implemented)

Time = 0.29 (sec) , antiderivative size = 195, normalized size of antiderivative = 1.13 \[ \int \frac {x^4 \left (c+d x^2+e x^4+f x^6\right )}{a+b x^2} \, dx=\frac {{\left (a^{2} b^{3} c - a^{3} b^{2} d + a^{4} b e - a^{5} f\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b} b^{5}} + \frac {35 \, b^{8} f x^{9} + 45 \, b^{8} e x^{7} - 45 \, a b^{7} f x^{7} + 63 \, b^{8} d x^{5} - 63 \, a b^{7} e x^{5} + 63 \, a^{2} b^{6} f x^{5} + 105 \, b^{8} c x^{3} - 105 \, a b^{7} d x^{3} + 105 \, a^{2} b^{6} e x^{3} - 105 \, a^{3} b^{5} f x^{3} - 315 \, a b^{7} c x + 315 \, a^{2} b^{6} d x - 315 \, a^{3} b^{5} e x + 315 \, a^{4} b^{4} f x}{315 \, b^{9}} \]

input
integrate(x^4*(f*x^6+e*x^4+d*x^2+c)/(b*x^2+a),x, algorithm="giac")
 
output
(a^2*b^3*c - a^3*b^2*d + a^4*b*e - a^5*f)*arctan(b*x/sqrt(a*b))/(sqrt(a*b) 
*b^5) + 1/315*(35*b^8*f*x^9 + 45*b^8*e*x^7 - 45*a*b^7*f*x^7 + 63*b^8*d*x^5 
 - 63*a*b^7*e*x^5 + 63*a^2*b^6*f*x^5 + 105*b^8*c*x^3 - 105*a*b^7*d*x^3 + 1 
05*a^2*b^6*e*x^3 - 105*a^3*b^5*f*x^3 - 315*a*b^7*c*x + 315*a^2*b^6*d*x - 3 
15*a^3*b^5*e*x + 315*a^4*b^4*f*x)/b^9
 
3.2.15.9 Mupad [B] (verification not implemented)

Time = 5.92 (sec) , antiderivative size = 243, normalized size of antiderivative = 1.41 \[ \int \frac {x^4 \left (c+d x^2+e x^4+f x^6\right )}{a+b x^2} \, dx=x^7\,\left (\frac {e}{7\,b}-\frac {a\,f}{7\,b^2}\right )+x^5\,\left (\frac {d}{5\,b}-\frac {a\,\left (\frac {e}{b}-\frac {a\,f}{b^2}\right )}{5\,b}\right )+x^3\,\left (\frac {c}{3\,b}-\frac {a\,\left (\frac {d}{b}-\frac {a\,\left (\frac {e}{b}-\frac {a\,f}{b^2}\right )}{b}\right )}{3\,b}\right )+\frac {f\,x^9}{9\,b}-\frac {a\,x\,\left (\frac {c}{b}-\frac {a\,\left (\frac {d}{b}-\frac {a\,\left (\frac {e}{b}-\frac {a\,f}{b^2}\right )}{b}\right )}{b}\right )}{b}-\frac {a^{3/2}\,\mathrm {atan}\left (\frac {a^{3/2}\,\sqrt {b}\,x\,\left (-f\,a^3+e\,a^2\,b-d\,a\,b^2+c\,b^3\right )}{f\,a^5-e\,a^4\,b+d\,a^3\,b^2-c\,a^2\,b^3}\right )\,\left (-f\,a^3+e\,a^2\,b-d\,a\,b^2+c\,b^3\right )}{b^{11/2}} \]

input
int((x^4*(c + d*x^2 + e*x^4 + f*x^6))/(a + b*x^2),x)
 
output
x^7*(e/(7*b) - (a*f)/(7*b^2)) + x^5*(d/(5*b) - (a*(e/b - (a*f)/b^2))/(5*b) 
) + x^3*(c/(3*b) - (a*(d/b - (a*(e/b - (a*f)/b^2))/b))/(3*b)) + (f*x^9)/(9 
*b) - (a*x*(c/b - (a*(d/b - (a*(e/b - (a*f)/b^2))/b))/b))/b - (a^(3/2)*ata 
n((a^(3/2)*b^(1/2)*x*(b^3*c - a^3*f - a*b^2*d + a^2*b*e))/(a^5*f - a^2*b^3 
*c + a^3*b^2*d - a^4*b*e))*(b^3*c - a^3*f - a*b^2*d + a^2*b*e))/b^(11/2)